package com.sunny.myproject.produce.entity;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sunny.myproject.storem.entity.Materiel;
import com.sunny.myproject.system.entity.IdEntity;

@Entity
@Table(name="tb_bom_sub")
public class Bom_sub extends IdEntity{

	private Materiel materiel;
	
	private Bom bom;
	/**
	 * 用量
	 */
	private double amount;
	/**
	 * 损耗
	 */
	private double loss;
	/**
	 * 位号
	 */
	private String location;
	/**
	 * 分节
	 */
	private Integer bomlevel;
	/**
	 * 制成代号
	 */
	private String makeCode;
	
	public String getMakeCode() {
		return makeCode;
	}
	public void setMakeCode(String makeCode) {
		this.makeCode = makeCode;
	}
	@ManyToOne(targetEntity=Materiel.class)
	public Materiel getMateriel() {
		return materiel;
	}
	public void setMateriel(Materiel materiel) {
		this.materiel = materiel;
	}
	@ManyToOne(targetEntity=Bom.class)
	public Bom getBom() {
		return bom;
	}
	public void setBom(Bom bom) {
		this.bom = bom;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public double getLoss() {
		return loss;
	}
	public void setLoss(double loss) {
		this.loss = loss;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public Integer getBomlevel() {
		return bomlevel;
	}
	public void setBomlevel(Integer bomlevel) {
		this.bomlevel = bomlevel;
	}

	
}
